import { Component } from 'react';
import { Input } from 'antd';
const { Search } = Input;
class HospitalAllHeader extends Component {
    constructor(props) {
        super(props);
        this.state = { 
            SearchData:[]
         }
    }
    testData=[{
            id:"01001",
            type:'普通病房'
          },{
            id:"01002",
            type:'VIP病房'
          },{
            id:"01003",
            type:'ICU病房'
          }
          ]
    onSearch(){
        setTimeout(() => {
            this.setState({ SearchData: this.testData },()=>{
                this.props.getSearchData(this.state.SearchData);
            });
        }, 2000);
    }
    render() { 
        return (
            <div><Search
            placeholder="input search text"
            enterButton="Search"
            size="large"
            onSearch={()=>this.onSearch()}
          /></div>
        );
    }
}
 
export default HospitalAllHeader;